<div id="passenger_search_div"></div>
<script>
    Ext.onReady(function(){
        var passengerName = new Ext.form.TextField({
            fieldLabel: '姓名',
            allowBlank: false,
            name: 'passenger_name',
            anchor: '90%'
        });
        var passengerCard = new Ext.form.TextField({
            fieldLabel: '证件号',
            //allowBlank: false,
            name: 'passenger_card',
            anchor: '90%'
        });
        var searchButton = new Ext.Button({
            text: '搜 索',
            handler: searchByPassengerInfo
        })
        var formPanel = new Ext.form.FormPanel({
            //baseCls: 'x-plain',
            labelWidth: 60,
            width: '500',
            labelAlign: 'right',
            frame: true,
            items: [{
                    layout: 'column',
                    border: false,
                    items: [{
                            columnWidth: .35,
                            layout: 'form',
                            border: false,
                            items: [passengerName]
                        },{
                            columnWidth: .5,
                            layout: 'form',
                            border: false,
                            items: [passengerCard]
                        },{
                            columnWidth: .15,
                            layout: 'form',
                            border: false,
                            items: [searchButton]
                        }]
                }]
        });
        formPanel.render('passenger_search_div');
        function searchByPassengerInfo(){
            if (formPanel.form.isValid()) {
                webOrderDS.removeAll();
                webOrderDS.baseParams.passenger_name = passengerName.getValue();
                webOrderDS.baseParams.passenger_card = passengerCard.getValue();
                webOrderDS.load({
                    params: {
                        start: 0,
                        limit: 10
                    }
                });
                webOrderDS.baseParams.passenger_name = null;
                webOrderDS.baseParams.passenger_card = null;
            }
        }
    });
</script>